#ifndef _DLIST_H_
#define _DLIST_H_

#include<stdio.h>
#include<assert.h>
#include<malloc.h>

#define ElemType int 

typedef struct Node
{
	ElemType data;
	struct  Node* prio;
	struct  Node* next;
}Node,*PNode;

typedef struct List
{
	PNode first;
	PNode last;
	int size;
}List;
Node* _buynode(ElemType x);
void InitDList(List* list0);
void push_back(List* list, ElemType x);
void show_list(List* mylist);
void push_front(List* list, ElemType x);
void pop_back(List* list);
void pop_front(List* list);
void insert_val(List* list, ElemType x);
Node* find(List* list, ElemType x);
int length(List* list);
void delete_val(List* list, ElemType x);
void sort(List* list);
void resver(List* list);
void clear(List* list);
void destroy(List* list);

#endif // !_DLIST_H_
